﻿<%@ Page Language="C#" ValidateRequest="false" MasterPageFile="~/Include/Admin.master"
    AutoEventWireup="true" CodeFile="Manage.aspx.cs" Inherits="Admin_Client_Manage" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <base target="_self" />
    <link href="../Scripts/jquery-easyui-1.3.1/themes/default/easyui.css" rel="stylesheet"
        type="text/css" />
    <script src="../Scripts/jquery-easyui-1.3.1/jquery.easyui.min.js" type="text/javascript"></script>
    <link href="../../Style/Common/DatePage.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <ajaxToolkit:ToolkitScriptManager runat="Server" EnableScriptGlobalization="true"
        EnableScriptLocalization="true" ID="ScriptManager1" />
    <table class="editTable" align="center" width="100%" cellpadding="0" cellspacing="1">
        <tr style="background-image: url('../../images/管理员页面/title_bg1.jpg'); background-repeat: repeat-x;">
            <td colspan="10" style="font-weight: bold; font-size: large; font-family: 仿宋;">
                <strong class="style1">用户管理中心</strong>
            </td>
        </tr>
        <tr>
            <th>
                省：
            </th>
            <td>
                <asp:DropDownList ID="drpSheng" runat="server" Height="20px" Width="100px" OnTextChanged="drpSheng_TextChanged"
                    AutoPostBack="true">
                </asp:DropDownList>
            </td>
            <th>
                市：
            </th>
            <td>
                <asp:DropDownList ID="drpShi" runat="server" Height="20px" Width="100px" OnTextChanged="drpShi_TextChanged"
                    AutoPostBack="true">
                </asp:DropDownList>
            </td>
            <th>
                区：
            </th>
            <td>
                <asp:DropDownList ID="drpQu" runat="server" Height="20px" Width="100px">
                </asp:DropDownList>
            </td>
            <th>
                性别：
            </th>
            <td>
                <asp:DropDownList ID="drpSex" runat="server" Height="20px" Width="100px">
                </asp:DropDownList>
            </td>
            <th>
                用户类型：
            </th>
            <td>
                <asp:DropDownList ID="drpUserType" runat="server" Height="20px" Width="100px">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <th>
                联系电话：
            </th>
            <td>
                <asp:TextBox ID="txtTelphone" runat="server" Height="20px"></asp:TextBox>
                <ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server"
                    TargetControlID="txtTelphone" FilterType="Custom,Numbers" ValidChars="-" />
                <ajaxToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender1" runat="server"
                    TargetControlID="txtTelphone" WatermarkText="只能输入数字和'-'" WatermarkCssClass="textwarmcss" />
            </td>
            <th>
                邮箱：
            </th>
            <td>
                <asp:TextBox ID="txtMail" runat="server" Height="20px"></asp:TextBox>
                <ajaxToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender4" runat="server"
                    TargetControlID="txtMail" WatermarkText="请输入有效的邮箱" WatermarkCssClass="textwarmcss" />
            </td>
            <th>
                积分
            </th>
            <td>
                从<asp:TextBox ID="txtJiFenFrom" runat="server" Height="21px" Width="100px"></asp:TextBox>
                <ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server"
                    TargetControlID="txtJiFenFrom" FilterType="Custom,Numbers" ValidChars="." />
                到<asp:TextBox ID="txtJiFenTo" runat="server" Height="21px" Width="100px"></asp:TextBox>
                <ajaxToolkit:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server"
                    TargetControlID="txtJiFenTo" FilterType="Custom,Numbers" ValidChars="." />
                <ajaxToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender2" runat="server"
                    TargetControlID="txtJiFenFrom" WatermarkText="输入整数或小数" WatermarkCssClass="textwarmcss" />
                <ajaxToolkit:TextBoxWatermarkExtender ID="TextBoxWatermarkExtender3" runat="server"
                    TargetControlID="txtJiFenTo" WatermarkText="输入整数或小数" WatermarkCssClass="textwarmcss" />
            </td>
            <td colspan="4">
                &nbsp;
            </td>
        </tr>
        <tr>
            <th>
                注册时间
            </th>
            <td>
                <asp:TextBox ID="txtTimeFrom" CssClass="easyui-datebox" runat="server" Height="21px" Width="100px"></asp:TextBox>
                --<asp:TextBox ID="txtTimeTo" CssClass="easyui-datebox" runat="server" Height="21px" Width="100px"></asp:TextBox>
            </td>
            <th>
                账号状态：
            </th>
            <td>
                <asp:DropDownList ID="drpUserStatus" runat="server" Height="20px" Width="100px">
                </asp:DropDownList>
            </td>
            <th>
                关键字：
            </th>
            <td>
                <asp:TextBox ID="txtKey" runat="server" Height="20px" Width="200px"></asp:TextBox>
                <ajaxToolkit:TextBoxWatermarkExtender ID="TeWo" runat="server" TargetControlID="txtKey"
                    WatermarkText="输入用户名，昵称，真实姓名" WatermarkCssClass="textwarmcss" />
            </td>
            <td colspan="4">
                <asp:Button ID="btn_search_Click" runat="server" Text="开始搜索" />
            </td>
        </tr>
    </table>
    <h4>
        <a href="Add.aspx">添加用户</a>
    </h4>
    <table style="width: 100%; margin-bottom: 0px;" class="editTable">
        <tr>
            <td align="center" colspan="4">
                <asp:ListView ID="lv_ClientList" runat="server" DataKeyNames="ID" OnItemDeleting="lv_ClientList_ItemDeleting"
                    OnPagePropertiesChanged="lv_ClientList_PagePropertiesChanged" OnItemDataBound="lv_ClientList_ItemDataBound"
                    OnItemCommand="lv_ClientList_ItemCommand">
                    <LayoutTemplate>
                        <table width="100%" class="editTable" cellspacing="1">
                            <th>
                                用户名
                            </th>
                            <th>
                                昵称
                            </th>
                            <th>
                                真实姓名
                            </th>
                            <th>
                                性别
                            </th>
                            <th>
                                省市区
                            </th>
                            <th>
                                联系电话
                            </th>
                            <th>
                                联系邮箱
                            </th>
                            <th>
                                账户类型
                            </th>
                            <th>
                                总积分
                            </th>
                            <th>
                                注册时间
                            </th>
                            <th>
                                账号状态
                            </th>
                            <th>
                                操作
                            </th>
                            <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                        </table>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <tr>
                            <td>
                                <%#Eval("Username")%>
                            </td>
                            <td>
                                <%# Eval("NiCheng")%>
                            </td>
                            <td>
                                <%# Eval("RealName")%>
                            </td>
                            <td>
                                <%#Enum.GetName(typeof(Client.sex),Eval("Sex"))%>
                            </td>
                            <td>
                                <%--<%#ReturnProName(Eval("ProvienceID"))%>-<%#ReturnCityName(Eval("CityID"))%>-<%#ReturnAreaName(Eval("ReginID"))%>--%>
                            </td>
                            <td>
                                <%# Eval("Telephone")%>
                            </td>
                            <td>
                                <%# Eval("Email")%>
                            </td>
                            <td>
                                <%# Eval("Type")%>
                            </td>
                            <td>
                                <%-- <%# Eval("TotalJiFen")%>--%>
                            </td>
                            <td>
                                <%#Eval("AddTime")%>
                            </td>
                            <td>
                                <%#Enum.GetName(typeof(Client.userstatus),Eval("Status"))%>
                            </td>
                            <td class="Action">
                                <asp:LinkButton ID="lbtnSelect" runat="server" Text="选择" CommandName="SelectUser"
                                    CommandArgument='<%#Eval("ID")%>' Visible="false"></asp:LinkButton>
                                <asp:HyperLink ID="hplEdit" runat="server" NavigateUrl='Add.aspx?UserID=<%#Eval("ID") %>'>修改</asp:HyperLink>
                                <asp:LinkButton ID="lbtnDelete" runat="server" Text="删除" OnClientClick="return confirm('您是否确定删除?');"
                                    CommandName="Delete" CommandArgument='<%#Eval("ID")%>'></asp:LinkButton>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:ListView>
                <div style="padding: 4px; text-align: center;">
                    <asp:DataPager ID="Pager" runat="server" PagedControlID="lv_ClientList" OnPreRender="Pager_PreRender"
                        PageSize="20">
                        <Fields>
                            <asp:NumericPagerField ButtonCount="10" CurrentPageLabelCssClass="CurrentPage" NumericButtonCssClass="Page" />
                            <asp:NextPreviousPagerField ShowLastPageButton="true" ShowPreviousPageButton="true"
                                ShowFirstPageButton="true" />
                            <asp:TemplatePagerField>
                                <PagerTemplate>
                                    共<%=Pager.TotalRowCount%>条
                                </PagerTemplate>
                            </asp:TemplatePagerField>
                        </Fields>
                    </asp:DataPager>
                </div>
            </td>
        </tr>
    </table>
    <script type="text/javascript">
    
    
    </script>
</asp:Content>
